package com.zyh.mapper;

import com.zyh.domain.Brand;
import com.zyh.domain.OrderItem;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


import java.util.List;

public interface BrandMapper {
    List<Brand> selectAll();
    Brand selectById(@Param("id") int id);
//    Brand selectById(@Param("id") int id,@Param("orderBy") String orderBy);
//    Brand selectById(@Param("id") int id,@Param("orderBy") String orderBy);
//    List<Brand> selectByCondition(@Param("brandName") String  brandName,
//                                  @Param("companyName") String companyName,
//                                  @Param("status")  Integer status);
    List<Brand> selectByCondition(Brand brand);

    int insert(Brand brand);

    int update(Brand brand);

    int delete(int id);

    int batchDelete(@Param("list")  List<Integer> list);

    int batchInsert(@Param("list")  List<Brand> list);

    @Select("select * from tb_brand")
    List<Brand> selectAllAnno();


    @Select("select * from tb_brand where id=#{id};")
    Brand getBrandByIdAnno(@Param("id") int id);
}
